// Jocara game project

#ifndef MAIN_MENU_H_INCLUDED
#define MAIN_MENU_H_INCLUDED

#include "precompiled_header.h"
#include "miscellaneous.h"

enum Buttons {
  kNewGame,
  kLoadGame,
  kOptions,
  kExit,
  kBack
};

enum Pages {
  kPageStart,
  kPageNotImplemented
};

GameModes MainMenu();
SDL_Surface* DrawBackground();

class MenuButton {
public:
  MenuButton(const Buttons id, const std::string text, const int x_rel,
             const int y_rel);
  ~MenuButton();
  inline bool state() { return state_;}
  inline void set_state(const bool state) { state_ = state;}
  SDL_Surface* image();
  SDL_Rect* rect();
  inline Buttons id() { return id_;}
  bool must_redraw();
protected:
  const unsigned int x_rel_;
  const unsigned int y_rel_;
  static const unsigned int h_ = 75;
  static const unsigned int w_ = 330;
  bool state_;
  bool drawn_state_;
  const Buttons id_;
  SDL_Surface* imageset_[2];
  SDL_Rect* rect_;
  bool new_here_;
};

void LoadPage(const Pages page);
void Back();

#endif // MAIN_MENU_H_INCLUDED

